package com.itshidu.jiaowu.dao;

import com.itshidu.jiaowu.entity.Classes;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author XiaZengming123
 * @since 2019-07-08
 */
@Repository
public interface ClassesMapper extends BaseMapper<Classes> {

    @Select("select * from classes a where a.name=#{classname}")
    Classes selectByName(String classname);

    @Select("select name from classes where id=#{id}")
    String SelectNameById(Long id);

    @Select("select name from classes")
    List<String> SelectAll();


}
